package cn.iocoder.yudao.module.erp.controller.admin.purpurchaseorder.vo;

import cn.iocoder.yudao.module.erp.dal.dataobject.purpurchaseorderitem.PurPurchaseOrderItemDO;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Schema(description = "管理后台 - ERP 采购单新增/修改 Request VO")
@Data
public class PurPurchaseOrderSaveReqVO {

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "32452")
    private String id;

    @Schema(description = "采购单编号-提交供应商采购单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "764")
    private String purchaseOrderId;

    @Schema(description = "一级库整合单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "8200")
    @NotEmpty(message = "一级库整合单编号不能为空")
    private String integrateId;

    @Schema(description = "是否主单", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer isMainOrder;

    @Schema(description = "主单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "17009")
    private String mainOrderId;

    @Schema(description = "采购时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime orderTime;

    @Schema(description = "供应商编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "26165")
    @NotNull(message = "供应商编号不能为空")
    private Long supplierId;

    @Schema(description = "合计价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "29324")
    private BigDecimal totalPrice;

    @Schema(description = "备注", example = "你说的对")
    private String remark;

    @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Integer status;

    @Schema(description = "订单完成状态", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer isFinished;

    @Schema(description = "流程实例的编号", example = "29753")
    private String processInstanceId;

    @Schema(description = "ERP 采购单项列表")
    private List<PurPurchaseOrderItemDO> purPurchaseOrderItems;

}